{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Regressão Linear Simples - Trabalho   \n",
    "\n",
    "\n",
    "__Equipe:__\n",
    "* Sayonara Santos Araújo\n",
    "* Lailson Azevedo do Rego\n",
    "\n",
    "\n",
    "## Estudo de caso: Seguro de automóvel sueco\n",
    "\n",
    "Agora, sabemos como implementar um modelo de regressão linear simples. Vamos aplicá-lo ao conjunto de dados do seguro de automóveis sueco. Esta seção assume que você baixou o conjunto de dados para o arquivo insurance.csv, o qual está disponível no notebook respectivo.\n",
    "\n",
    "O conjunto de dados envolve a previsão do pagamento total de todas as reclamações em milhares de Kronor sueco, dado o número total de reclamações. É um dataset composto por 63 observações com 1 variável de entrada e 1 variável de saída. Os nomes das variáveis são os seguintes:\n",
    "\n",
    "1. Número de reivindicações.\n",
    "2. Pagamento total para todas as reclamações em milhares de Kronor sueco.\n",
    "\n",
    "Voce deve adicionar algumas funções acessórias à regressão linear simples. Especificamente, uma função para carregar o arquivo CSV chamado *load_csv ()*, uma função para converter um conjunto de dados carregado para números chamado *str_column_to_float ()*, uma função para avaliar um algoritmo usando um conjunto de treino e teste chamado *split_train_split ()*, a função para calcular RMSE chamado *rmse_metric ()* e uma função para avaliar um algoritmo chamado *evaluate_algorithm()*.\n",
    "\n",
    "Utilize um conjunto de dados de treinamento de 60% dos dados para preparar o modelo. As previsões devem ser feitas nos restantes 40%. \n",
    "\n",
    "Compare a performabce do seu algoritmo com o algoritmo baseline, o qual utiliza a média dos pagamentos realizados para realizar a predição ( a média é 72,251 mil Kronor).\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Resolução"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from sklearn.model_selection import train_test_split\n",
    "from math import sqrt\n",
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "class Prediction(object):\n",
    "    def __init__(self):\n",
    "        self.x_column = None\n",
    "        self.y_column = None\n",
    "\n",
    "    #Dados iniciais (Para deixar todas as funções genéricas)    \n",
    "    def column_name(self, x_column_name, y_column_name):\n",
    "        self.x_column = x_column_name\n",
    "        self.y_column = y_column_name\n",
    "\n",
    "    #Função para carregar o arquivo CSV\n",
    "    def load_csv(self, name_dataset):\n",
    "        return pd.read_csv(name_dataset, names=[self.x_column, self.y_column])\n",
    "\n",
    "    #Função para converter um conjunto de dados carregado para números\n",
    "    def str_column_to_float(self, dataset):\n",
    "        columns = [self.x_column, self.y_column]\n",
    "        for column in columns:\n",
    "            dataset[column] = dataset[column].astype(float)\n",
    "    \n",
    "    #Função para separar o dataset em um conjunto de treino e teste\n",
    "    def split_train_split(self, dataset, porcentage_test):\n",
    "        y = dataset[self.y_column].values\n",
    "        X = dataset[self.x_column].values\n",
    "        X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=porcentage_test)\n",
    "        return X_train, X_test, y_train, y_test\n",
    "    \n",
    "    #Calcula a média de uma coluna\n",
    "    def mean(self, values):\n",
    "        return sum(values) / float(len(values))\n",
    "        \n",
    "    #Calcula a variância de uma coluna\n",
    "    def variance(self, values, mean):\n",
    "        return sum([(x-mean)**2 for x in values])\n",
    "    \n",
    "    #Calcula a covariância entre x e y\n",
    "    def covariance(self, x, mean_x, y, mean_y):\n",
    "        covar = 0.0\n",
    "        for i in range(len(x)):\n",
    "            covar += (x[i] - mean_x) * (y[i] - mean_y)\n",
    "        return covar\n",
    "\n",
    "    #Calcula os coeficientes\n",
    "    def coefficients(self, X_train, y_train):\n",
    "        x_mean = self.mean(X_train)\n",
    "        y_mean = self.mean(y_train)\n",
    "        b1 = self.covariance(X_train, x_mean, y_train, y_mean) / self.variance(X_train, x_mean)\n",
    "        b0 = y_mean - b1 * x_mean\n",
    "        return b0, b1\n",
    "    \n",
    "    def linear_regression(self, X_train, y_train, X_test):\n",
    "        prediction = list()\n",
    "        b0, b1 = self.coefficients(X_train, y_train)\n",
    "        for i in range(len(X_test)):\n",
    "            y_predicted = b0 + b1*X_test[i]\n",
    "            prediction.append(y_predicted)\n",
    "        return prediction\n",
    "    \n",
    "    def base_line(self, X_train, y_train, X_test): #(?)\n",
    "        y_mean = self.mean(y_train)\n",
    "        prediction = [y_mean]*len(X_test)\n",
    "        return prediction\n",
    "    \n",
    "    #Função para calcular RMSE\n",
    "    def rmse_metric(self, actual, predicted):\n",
    "        sum_error = 0.0\n",
    "        for i in range(len(actual)):\n",
    "            prediction_error = predicted[i] - actual[i]\n",
    "            sum_error += (prediction_error ** 2)\n",
    "        mean_error = sum_error / float(len(actual))\n",
    "        return sqrt(mean_error)\n",
    "\n",
    "    #Função para avaliar um algoritmo\n",
    "    def evaluate_algorithm(self, X_train, y_train, X_test, y_test, algorithm):\n",
    "        predicted = algorithm(X_train, y_train, X_test)\n",
    "        rmse = self.rmse_metric(y_test, predicted)\n",
    "        return rmse, predicted"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "p = Prediction()\n",
    "p.column_name('claims','payment')\n",
    "dataset = p.load_csv('insurance.csv')\n",
    "p.str_column_to_float(dataset)\n",
    "X_train, X_test, y_train, y_test = p.split_train_split(dataset, 0.4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>claims</th>\n",
       "      <th>payment</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>108.0</td>\n",
       "      <td>392.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>19.0</td>\n",
       "      <td>46.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>13.0</td>\n",
       "      <td>15.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>124.0</td>\n",
       "      <td>422.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>40.0</td>\n",
       "      <td>119.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>57.0</td>\n",
       "      <td>170.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>23.0</td>\n",
       "      <td>56.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>14.0</td>\n",
       "      <td>77.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>45.0</td>\n",
       "      <td>214.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>10.0</td>\n",
       "      <td>65.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>5.0</td>\n",
       "      <td>20.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>48.0</td>\n",
       "      <td>248.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>11.0</td>\n",
       "      <td>23.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>23.0</td>\n",
       "      <td>39.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>7.0</td>\n",
       "      <td>48.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>2.0</td>\n",
       "      <td>6.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>24.0</td>\n",
       "      <td>134.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>6.0</td>\n",
       "      <td>50.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>3.0</td>\n",
       "      <td>4.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>23.0</td>\n",
       "      <td>113.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>6.0</td>\n",
       "      <td>14.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>9.0</td>\n",
       "      <td>48.7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>9.0</td>\n",
       "      <td>52.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>3.0</td>\n",
       "      <td>13.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>29.0</td>\n",
       "      <td>103.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>7.0</td>\n",
       "      <td>77.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>4.0</td>\n",
       "      <td>11.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>20.0</td>\n",
       "      <td>98.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>7.0</td>\n",
       "      <td>27.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>4.0</td>\n",
       "      <td>38.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33</th>\n",
       "      <td>5.0</td>\n",
       "      <td>40.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>34</th>\n",
       "      <td>22.0</td>\n",
       "      <td>161.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>35</th>\n",
       "      <td>11.0</td>\n",
       "      <td>57.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36</th>\n",
       "      <td>61.0</td>\n",
       "      <td>217.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37</th>\n",
       "      <td>12.0</td>\n",
       "      <td>58.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>38</th>\n",
       "      <td>4.0</td>\n",
       "      <td>12.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39</th>\n",
       "      <td>16.0</td>\n",
       "      <td>59.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40</th>\n",
       "      <td>13.0</td>\n",
       "      <td>89.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>41</th>\n",
       "      <td>60.0</td>\n",
       "      <td>202.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>42</th>\n",
       "      <td>41.0</td>\n",
       "      <td>181.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>43</th>\n",
       "      <td>37.0</td>\n",
       "      <td>152.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>44</th>\n",
       "      <td>55.0</td>\n",
       "      <td>162.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>45</th>\n",
       "      <td>41.0</td>\n",
       "      <td>73.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>46</th>\n",
       "      <td>11.0</td>\n",
       "      <td>21.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>47</th>\n",
       "      <td>27.0</td>\n",
       "      <td>92.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>48</th>\n",
       "      <td>8.0</td>\n",
       "      <td>76.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>49</th>\n",
       "      <td>3.0</td>\n",
       "      <td>39.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>17.0</td>\n",
       "      <td>142.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>51</th>\n",
       "      <td>13.0</td>\n",
       "      <td>93.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>52</th>\n",
       "      <td>13.0</td>\n",
       "      <td>31.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>53</th>\n",
       "      <td>15.0</td>\n",
       "      <td>32.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>54</th>\n",
       "      <td>8.0</td>\n",
       "      <td>55.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>55</th>\n",
       "      <td>29.0</td>\n",
       "      <td>133.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>56</th>\n",
       "      <td>30.0</td>\n",
       "      <td>194.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57</th>\n",
       "      <td>24.0</td>\n",
       "      <td>137.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>58</th>\n",
       "      <td>9.0</td>\n",
       "      <td>87.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59</th>\n",
       "      <td>31.0</td>\n",
       "      <td>209.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60</th>\n",
       "      <td>14.0</td>\n",
       "      <td>95.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>61</th>\n",
       "      <td>53.0</td>\n",
       "      <td>244.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>62</th>\n",
       "      <td>26.0</td>\n",
       "      <td>187.5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>63 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "    claims  payment\n",
       "0    108.0    392.5\n",
       "1     19.0     46.2\n",
       "2     13.0     15.7\n",
       "3    124.0    422.2\n",
       "4     40.0    119.4\n",
       "5     57.0    170.9\n",
       "6     23.0     56.9\n",
       "7     14.0     77.5\n",
       "8     45.0    214.0\n",
       "9     10.0     65.3\n",
       "10     5.0     20.9\n",
       "11    48.0    248.1\n",
       "12    11.0     23.5\n",
       "13    23.0     39.6\n",
       "14     7.0     48.8\n",
       "15     2.0      6.6\n",
       "16    24.0    134.9\n",
       "17     6.0     50.9\n",
       "18     3.0      4.4\n",
       "19    23.0    113.0\n",
       "20     6.0     14.8\n",
       "21     9.0     48.7\n",
       "22     9.0     52.1\n",
       "23     3.0     13.2\n",
       "24    29.0    103.9\n",
       "25     7.0     77.5\n",
       "26     4.0     11.8\n",
       "27    20.0     98.1\n",
       "28     7.0     27.9\n",
       "29     4.0     38.1\n",
       "..     ...      ...\n",
       "33     5.0     40.3\n",
       "34    22.0    161.5\n",
       "35    11.0     57.2\n",
       "36    61.0    217.6\n",
       "37    12.0     58.1\n",
       "38     4.0     12.6\n",
       "39    16.0     59.6\n",
       "40    13.0     89.9\n",
       "41    60.0    202.4\n",
       "42    41.0    181.3\n",
       "43    37.0    152.8\n",
       "44    55.0    162.8\n",
       "45    41.0     73.4\n",
       "46    11.0     21.3\n",
       "47    27.0     92.6\n",
       "48     8.0     76.1\n",
       "49     3.0     39.9\n",
       "50    17.0    142.1\n",
       "51    13.0     93.0\n",
       "52    13.0     31.9\n",
       "53    15.0     32.1\n",
       "54     8.0     55.6\n",
       "55    29.0    133.3\n",
       "56    30.0    194.5\n",
       "57    24.0    137.9\n",
       "58     9.0     87.4\n",
       "59    31.0    209.8\n",
       "60    14.0     95.5\n",
       "61    53.0    244.6\n",
       "62    26.0    187.5\n",
       "\n",
       "[63 rows x 2 columns]"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dataset"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Avaliação do algoritmo de Regressão Linear"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "error_rl, prediction_rl = p.evaluate_algorithm(X_train, y_train, X_test, y_test, p.linear_regression)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Erro quadrático: 33.76\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEICAYAAABRSj9aAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xt8VNW9///XB4xCvOEFLAokaEFF\nwRiDgh5BRPEuelqtmiLUC1Kkx1601XJssZWjRav+rP6stEfRQtV6qVIvrRThWEWloSpVKIg0YAQl\ngiIYwIR8vn/snWQmM0kml7nm/Xw85jHZa2b2XnsyeWfN2muvbe6OiIjkri7proCIiCSXgl5EJMcp\n6EVEcpyCXkQkxynoRURynIJeRCTHKehF4jCz35rZMjPra2bzk7D+E81sRUevVyQeBb10ODMrN7Nt\nZrbVzD4ys1lmtke669VK+wOlwGPAH9q6kvC9OKVxubv/zd0PbUf9RBKmoJdkOcfd9wCKgKOBG5Kx\nETPrmoz1uvt57v6mux/v7vcnYxvpYGa7pLsOknoKekkqd/8I+AtB4ANgZruZ2e1mttbMPjaz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Pu7BBePWEZwSbers3XETdeuXSkqKuKII47gqKOO4o477qC2trZV\n65gwYQJPPPFEh9arsLCQTz5pbvrzaHfddRdVjT/kCXr66adZtmxZm17bHscff3zKtyk5bO3a1pXn\nmBaD3t1fcXdz9yHuXhTennf3ce4+OCw/NxydU/ea6e5+iLsfGl5IIvmS0P/WvXt33nrrLd59913m\nzZvH888/z0033dTu9aZaOoO+pqZtswsvWrSozdsUiRFnwEez5TkmN86Mret/W7MG3Bv63zrwYEuv\nXr2YOXMm99xzD+5OeXk5J554IsXFxRQXF9cHk7szZcoUBg0axFlnncWGDRvq1zF//nyOPvpoBg8e\nzGWXXcaOHcFFk66//noGDRrEkCFDuPbaa2O2vXHjRsaMGcPRRx/NVVddReSMo7Nnz+bYY4+lqKiI\nq666ip07o7883X333axbt45Ro0YxatQoAF588UWGDx9OcXExF1xwAVu3bo1bj0WLFjF37lyuu+46\nioqKeP/993n//fc5/fTTOeaYYzjxxBP517/+FVPfadOmMXHiRMaMGcOll17Kzp07ue666xg6dChD\nhgzh/vvvB2Dr1q2MHj2a4uJiBg8ezDPPPFO/jj32CC4hu379ekaMGEFRURFHHnkkf/vb31r/yxOZ\nPh3y86PL8vOD8s7A3dN+O+aYY7yxZcuWxZQ1qaDAPYj46FtBQeLriGP33XePKevRo4d/9NFH/sUX\nX/i2bdvc3X3lypVetw9PPvmkn3LKKV5TU+Mffvih77333v7444/7tm3bvE+fPr5ixQp3dx83bpzf\neeedvnHjRh84cKDX1ta6u/unn34as83vfOc7ftNNN7m7+7PPPuuAV1ZW+rJly/zss8/2L7/80t3d\nv/3tb/tDDz0U5+0p8MrKSnd3r6ys9BNPPNG3bt3q7u633nqr33TTTU3WY/z48f7444/Xr+vkk0/2\nlStXurv766+/7qNGjYrZ3k9/+lMvLi72qqoqd3e///77/ec//7m7u2/fvt2POeYYX716tVdXV/vm\nzZvr63XIIYfUb7/uvb/99tv95ptvdnf3mpoa//zzz2O2lw6t+nxKZpg9O8gEs+B+9ux016jdgDJP\nIGMzYlKzdkth/5uHrenq6mqmTJnCW2+9RdeuXVm5ciUAL7/8MhdffDFdu3blwAMP5OSTTwZgxYoV\n9O/fn4EDBwIwfvx47r33XqZMmUK3bt244oorOOusszj77LNjtvnyyy/z1FNPAXDWWWexzz77AME3\nhCVLljB06FAAtm3bRq9evZqt/+uvv86yZcs44YQTAPjyyy8ZPnw4e+21V4v12Lp1K4sWLeKCCy6o\nL6v7VtLYueeeS/fu3YHgG8TSpUvrj1Vs3ryZ9957jz59+vDjH/+Yl19+mS5duvDhhx/y8ccf85Wv\nfKV+PUOHDuWyyy6jurqa8847j6Kiomb3T6RJpaWdYoRNPLkR9P36Bd018co70OrVq+natSu9evXi\npptu4oADDuDtt9+mtraWbt261T8v3vC7un8Qje2yyy4sXryY+fPn8+ijj3LPPffw0ksvxTyvqXWO\nHz+eW265JeF9cHdOPfVUHnnkkZjHWqpHbW0tPXr04K233mpxO7vvvnvUNn/1q19x2mnR0x7NmjWL\nyspKlixZQl5eHoWFhTHj00eMGMHLL7/Mc889x7hx47juuuu49NJLE95fEcmVPvoU9L9VVlYyadIk\npkyZgpmxefNmevfuTZcuXfjd735X3zc+YsQIHn30UXbu3Mn69etZsGABAIcddhjl5eWsWrUKgN/9\n7neMHDmSrVu3snnzZs4880zuuuuuuCE6YsQI5oTHG1544QU+/fRTAEaPHs0TTzxRfxxg06ZNrInz\nD2/PPfdky5YtAAwbNoxXX321vh5VVVWsXLmyyXpEvnavvfaif//+PP7440AQ4G+//XaL791pp53G\nfffdR3V1NQArV67kiy++YPPmzfTq1Yu8vDwWLFgQt+5r1qyhV69eXHnllVx++eX84x//aHF7IhIt\nN1r0dV/Hpk4Numv69QtCvp1f07Zt20ZRURHV1dXssssujBs3ju9///sATJ48ma997Ws8/vjjjBo1\nqr4Fe/755/PSSy8xePBgBg4cyMiRI4FgfpQHH3yQCy64gJqaGoYOHcqkSZPYtGkTY8eOZfv27bg7\nd955Z0w9fvrTn3LxxRdTXFzMyJEj66eMGDRo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uDn8P2bgvO4CT3f0ooAg43cyGAb8A7gz3\n5VPg8jTWsbWuAZZHLGfzvoxy96KIMefZ+Bn7/4A/u/thwFEEv5vk74e7Z+UNGA78JWL5BuCGdNer\nlftQCLwTsbwC6B3+3BtYke46tmGfngFOzfZ9AfKBfwDHEZy1uEtYHvW5y+QbwZXd5gMnA88SXOIz\nW/elHNi/UVlWfcaAvYB/Ew6CSeV+ZG2LngQuQJ6FDnD39QDhfa8016dVzKwQOBp4gyzdl7Cr4y1g\nAzAPeB/4zN1rwqdk0+fsLuCHQG24vB/Zuy8OvGhmS8xsYliWbZ+xg4FK4MGwO+23ZrY7KdiPbA76\nFi9ALqljZnsATwLfdffP012ftnL3ne5eRNAaPhY4PN7TUlur1jOzs4EN7r4ksjjOUzN+X0InuHsx\nQVft1WY2It0VaoNdgGLgPnc/GviCFHU3ZXPQJ/cC5OnxsZn1BgjvN6S5PgkxszyCkJ/j7k+FxVm5\nL3Xc/TNgIcFxhx5mVnc1tmz5nJ0AnGtm5cCjBN03d5Gd+4K7rwvvNwB/JPgnnG2fsQqgwt3fCJef\nIAj+pO9HNgd9ci9Anh5zgfHhz+MJ+rszmpkZ8L/Acne/I+KhbNyXnmbWI/y5O3AKwcGyBcDXw6dl\nxb64+w3u3sfdCwn+Nl5y91KycF/MbHcz27PuZ2AM8A5Z9hlz94+AD8zs0LBoNLCMVOxHug9QtPPg\nxpnASoJ+1Knprk8r6/4IsB6oJvhPfzlBH+p84L3wft901zOB/fgPgq//S4G3wtuZWbovQ4A3w315\nB/hJWH4wsBhYBTwO7JbuurZyv04Cns3WfQnr/HZ4e7fubz1LP2NFQFn4GXsa2CcV+6EpEEREclw2\nd92IiEgCFPQiIjlOQS8ikuMU9CIiOU5BLyKS4xT0IiI5TkEvIpLj/h887Dr+ff8d8wAAAABJRU5E\nrkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fbf15b25da0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "red_dot, = plt.plot(X_test, y_test, 'ro')\n",
    "blue_dot, = plt.plot(X_test, prediction_rl, 'b-')\n",
    "plt.legend([red_dot, blue_dot], [\"Dados de teste reais\", \"Dados de teste preditados\"])\n",
    "plt.title(\"Regressão Linear\")\n",
    "print('Erro quadrático: {0:.2f}'.format(error_rl))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Avaliação do algoritmo de Base Line"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "error_bl, prediction_bl = p.evaluate_algorithm(X_train, y_train, X_test, y_test, p.base_line)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Erro quadrático: 71.09\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEICAYAAABRSj9aAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4wLCBo\ndHRwOi8vbWF0cGxvdGxpYi5vcmcvpW3flQAAIABJREFUeJzt3Xt8VNXd7/HPD0iFKIoXUDSQoAUV\nDIYYUPQRBC+oWC/t8VRNEbxFVKw9VfuovFqhldM+1Uc9Vh8rtopKHi+gVY6XVotw8K7BohUoiDRg\nBCUGRTFgA/mdP/ZOGEIuk8tkZvZ836/XvPbsNXv2Xmsy+c3aa629trk7IiISXV2SnQEREUksBXoR\nkYhToBcRiTgFehGRiFOgFxGJOAV6EZGIU6AXaYSZ/cHMlplZPzObn4D9H29mKzp6vyKNUaCXDmdm\n5Wa2xcw2m9mnZjbLzPZIdr5aaT+gGHgceKKtOwk/i5Maprv7K+5+aDvyJxI3BXpJlO+5+x5AATAM\nuDERBzGzronYr7uf7e5/c/dj3f2+RBwjGcysW7Lz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tuucXd3bdt2+ZfffXVLsdLhlZ9PyU1zJ4dxASzYDl7drJz1G5AmccR\nY1NiUrN268T2Nw9r0zU1NUyZMoUlS5bQtWtXVq5cCcCiRYs4//zz6dq1KwceeCBjx44FYMWKFQwY\nMIBBgwYBMHHiRO655x6mTJlC9+7dufTSSxk/fjxnnHHGLsdctGgRTz31FADjx49n7733BoIzhMWL\nFzN8+HAAtmzZQp8+fZrN/5tvvsmyZcs47rjjAPjXv/7FyJEj2XPPPVvMx+bNm3n99dc599xz69Pq\nzkoaOvPMM+nRowcQnEG8//779X0VmzZt4sMPPyQnJ4ebbrqJRYsW0aVLFz755BM+++wzDjjggPr9\nDB8+nIsvvpiamhrOPvtsCgoKmi2fSJOKizNihE1johHo+/cPmmsaS+9Aq1evpmvXrvTp04fp06ez\n//77895771FbW0v37t3rt2ts+F3dD0RD3bp14+2332b+/Pk89thj3H333bz88su7bNfUPidOnMiv\nf/3ruMvg7px88sk8+uiju7zWUj5qa2vp1asXS5YsafE4u++++07H/N3vfse4cTtPezRr1iwqKytZ\nvHgxWVlZ5OXl7TI+fdSoUSxatIjnnnuOCRMmcP3113PhhRfGXV4RiUobfSe0v1VWVjJ58mSmTJmC\nmbFp0yb69u1Lly5deOSRR+rbxkeNGsVjjz3G9u3bWb9+PQsWLADgsMMOo7y8nFWrVgHwyCOPMHr0\naDZv3symTZs4/fTTufPOOxsNoqNGjaI07G944YUX+OKLLwA48cQTmTt3bn0/wMaNG1nTyA9ez549\n+frrrwE45phjeO211+rzUV1dzcqVK5vMR+x799xzTwYMGMCcOXOAIIC/9957LX5248aN495776Wm\npgaAlStX8s0337Bp0yb69OlDVlYWCxYsaDTva9asoU+fPlx22WVccsklvPvuuy0eT0R2Fo0afd3p\n2NSpQXNN//5BkG/nadqWLVsoKCigpqaGbt26MWHCBH76058CcOWVV/KDH/yAOXPmMGbMmPoa7Dnn\nnMPLL79Mfn4+gwYNYvTo0UAwP8qDDz7Iueeey7Zt2xg+fDiTJ09m48aNnHXWWWzduhV354477tgl\nHzfffDPnn38+hYWFjB49un7KiMGDB3PLLbdwyimnUFtbS1ZWFvfccw+5ubk7vb+kpITTTjuNvn37\nsmDBAmbNmsX5559f3+xyyy230LNnz0bzcd5553HZZZdx1113MXfuXEpLS7niiiu45ZZbqKmp4bzz\nzuPII49s9nO89NJLKS8vp7CwEHend+/ePP300xQXF/O9732PoqIiCgoKOOyww3Z578KFC7n11lvJ\nyspijz324OGHH27Nn1BESJF7xhYVFXnDG48sX76cww8/PEk5Emmevp+SCsxssbsXtbRdNJpuRESk\nSQr0IiIRp0AvIhJxCvQiIhGnQC8iEnEK9CIiEadA3wxNU5y8aYpjzZo1iylTpgDw+9//vn4s/axZ\ns1i3rnX3tCkvL+eII47o8DyKpDIF+mZomuLEBfqGs2zGa/LkyfVTILQl0ItkIgX6OGma4tZNUzxh\nwgTGjh3LwIEDuf/++4HgKtcxY8ZwwQUXkJ+f32z+H3zwwfori1977bWd9n3bbbcxd+5cysrKKC4u\npqCggC1btvDLX/6S4cOHc8QRR1BSUlL/OS1evJgjjzySkSNHcs8999Tva+vWrVx00UXk5+czbNiw\n+ukqli5dWp+noUOH8uGHH7b8BRFJZfFMcZnoR0vTFF9zjfvo0R37uOaaFub/dE1T7N72aYqHDh3q\n1dXVXllZ6Tk5Of7JJ5/4ggULPDs721evXu3u3mT+161b5/369fMNGzb4t99+68cee6xfddVV9fu+\n9dZb3d199OjR/s4779Qft6qqqv75j370I583b567u+fn5/vChQvd3f26667zIUOGuHswBfKkSZPc\n3X358uXer18/37Jli0+ZMsVnh1PYfvvtt/XTLcfSNMWSCsioaYo7kWua4rimKT7rrLPo0aMHPXr0\nYMyYMbz99tv06tWLESNGMGDAgGbz/9Zbb3HCCSfQu3dvAH74wx/Wf77NWbBgAb/97W+prq5m48aN\nDBkyhFGjRvHll1/Wzzk0YcIEXnghuOnZq6++ytVXXw0Ek87l5uaycuVKRo4cyYwZM6ioqOD73/8+\nAwcObPHYIqksLQL9nXcmOwcBTVMc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ISMT9fzesVKbiCXxcAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fbf0e6bae48>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "red_dot, = plt.plot(X_test, y_test, 'ro')\n",
    "blue_dot, = plt.plot(X_test, prediction_bl, 'b-')\n",
    "plt.legend([red_dot, blue_dot], [\"Dados de teste reais\", \"Dados de teste preditados\"])\n",
    "plt.title(\"Regressão Linear\")\n",
    "print('Erro quadrático: {0:.2f}'.format(error_bl))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
